package com.kindel.service.weixin;

import com.common.model.view.wechat.applet.JsCode2SessionResView;
import com.common.model.view.wechat.applet.WechatAppletUserInfo;

import java.io.Serializable;

/**
 * Created by demongao on 2017/9/6.
 */
public interface WeixinService extends Serializable {

    void removeSession3rdFromRedis(String session_3rd);

    JsCode2SessionResView saveSession3rdToRedis(String randomStr, JsCode2SessionResView jsCode2SessionResView);

    JsCode2SessionResView loadSession3rdFromRedis(String session_3rd);

    /**
     * 将用户信息存储到redis
     * @param session_3rd
     * @param userInfo
     * @return
     */
    WechatAppletUserInfo saveWechatAppletUserInfoToRedis(String session_3rd, WechatAppletUserInfo userInfo);

    WechatAppletUserInfo loadWechatAppletUserInfoFromRedis(String session_3rd);

    void removeWechatAppletUserInfoFromRedis(String session_3rd);

    boolean saveOrUpdateWechatAppletUserInfo(WechatAppletUserInfo wechatAppletUserInfo);
}
